package oop.day02.Exercise;
public abstract   class Animal
{
    String name;
    int age;
    String color;
    Animal(String name,int age,String color){
        this.name = name;
        this.age = age;
        this.color = color;
    };

    void drink()
    {
        System.out.println(" there is a animal drinking");
    }

    abstract void eat();
}


class Dog extends Animal implements Swim
{
    Dog(String name,int age,String color)
    {
        super(name,age, color);
    }

    public void swim()
    {
        System.out.println("there is a dog swimming");
    }

    void eat()
    {
        System.out.println("there is a dong eating");
    }

    void lookHome()
    {
        System.out.println("there is a dong looking hone");
    }

}



class Chick extends Animal
{
    Chick(String name,int age,String color)
    {
        super(name,age,color);
    }

    public void swim()
    {
        System.out.println();
    }
    void eat()
    {
        System.out.println();
    }
    void layEggs()
    {
        System.out.println("there is a chick laying eggs");
    }
}

class Fish extends Animal implements Swim
{
    Fish(String name,int age,String color)
    {
        super(name,age,color);
    }

    public void swim()
    {
        System.out.println("there is a fish swimming");
    };
    void eat()
    {
        System.out.println("there is a fish eating");

    }
}

